import request from '@/utils/request'

/* 房间列表 */
export function roomList(data) {
	return request({
	  url: `/wechat/room/my-list`,
	  method: 'get',
	  data,
	})
}

/* 房间入住详情 */
export function roomDetail(checkInId) {
	return request({
	  url: `/wechat/room/check-in-detail/${checkInId}`,
	  method: 'get',
	})
}

/* 获取房间用电记录 */
export function roomElectricityRecord(params) {
	return request({
	  url: `/wechat/room/${params.roomId}/electricity-records`,
	  method: 'get',
	  params
	})
}

/* 充值电费 */
export function roomElectricityRecharge(params) {
	return request({
	  url: `/wechat/room/${params.roomId}/recharge`,
	  method: 'post',
	  params
	})
}

/* 公寓列表 */
export function apartmentList(data) {
	return request({
	  url: `/wechat/room/my-apartments`,
	  method: 'get',
	  data,
	})
}

/* 空闲房间列表 */
export function emptyRoomList(data) {
	return request({
	  url: `/wechat/room/empty-list/${data.apartmentId}`,
	  method: 'get',
	  data,
	})
}
